﻿using System.Collections.Generic;
using Model.Database;

namespace IBll
{
    public partial interface IDepartmentBll
    {
        /// <summary>
        /// 添加部门及Department_Role关系表
        /// </summary>
        /// <param name="department"></param>
        bool AddDepartmentAndDepartment_Role(Department department);
        /// <summary>
        /// 批量删除部门及部门角色
        /// </summary>
        /// <param name="idArr"></param>
        void ListDelete(string[] idArr);
        /// <summary>
        /// 获取部门分配的角色名
        /// </summary>
        /// <param name="departmentId"></param>
        /// <returns></returns>
        string GetRoleName(string departmentId);
        /// <summary>
        /// 获取部门分配的角色Ids
        /// </summary>
        /// <param name="departmentId"></param>
        /// <returns></returns>
        string GetRoleIds(string departmentId);
        /// <summary>
        /// 获取部门分配的角色
        /// </summary>
        /// <param name="departmentId"></param>
        /// <returns></returns>
        List<Role> GetRole(string departmentId);
        /// <summary>
        /// 更新部门及Department_Role关系表
        /// </summary>
        /// <param name="departmentOld"></param>
        /// <returns></returns>
        bool UpdateDepartmentAndDepartment_Role(Department departmentOld);
        /// <summary>
        /// 根据Id数组获取部门集合
        /// </summary>
        /// <param name="departmentIdArr"></param>
        /// <returns></returns>
        List<Department> GetDepartmentByIdArr(string[] departmentIdArr);
    }
}
